import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import 'element-plus/lib/theme-chalk/index.css'
import ElementPlus from 'element-plus'
import 'dayjs/locale/zh-cn'
import locale from 'element-plus/lib/locale/lang/zh-cn'
import './assets/css/reset.scss'

import VueLazyLoad from 'vue3-lazyload'
import loadingGif from './assets/images/loading.gif'
import notFoundPng from './assets/images/404.png'

import './permission'

const app = createApp(App)
app
  .use(VueLazyLoad, {
    loading: notFoundPng,
    error: notFoundPng,
    lifecycle: {
      loading: () => {
      },
      error: () => {
      },
      loaded: () => {
      }
    }
  })
  .use(ElementPlus, { size: 'mini', zIndex: 3000, locale })
  .use(router)
  .mount('#app')
